<%-- 
    Document   : form lihat barang toko
    Created on : Nov 21, 2013, 6:06:25 AM
    Author     : admin
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="bean.BarangGudang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body bgcolor="856FD7"><br><br>
        <table border="0" align="center" width="600">
            <tr>
                <td align="center"><img src="image/logo.png" width="380" height="100"></td>
            </tr>
        </table><br>
    <font face="ESP_Bold" size="5px"><center>DATA BARANG GUDANG</center></font>
    <table border="1" align="center" width="550" height="80">
        <tr>
            <td align="center" bgcolor="689CD2">NO</td>
            <td align="center" bgcolor="689CD2">ID BARANG</td>
            <td align="center" bgcolor="689CD2">ID BARANG</td>
            <td align="center" bgcolor="689CD2">JUMLAH BARANG</td>
            <td align="center" bgcolor="689CD2">HARGA BARANG</td>
        </tr>
        <%
            BarangGudang barangGudang = new BarangGudang();
            ResultSet resultSet = barangGudang.tampilBarang();
            int counter = 1;
            while (resultSet.next()) {
                out.print("<tr>");
                out.print("<td align='center'>" + (counter) + "</td>");
                out.print("<td align='center'>" + resultSet.getString("idbarang") + "</td>");
                out.print("<td align='center'>" + resultSet.getString("namabarang") + "</td>");
                out.print("<td align='center'>" + resultSet.getString("jumlahbarang") + "</td>");
                out.print("<td align='center'>" + resultSet.getString("hargabarang") + "</td>");
                out.print("</tr>");
                counter++;
            }
        %>      
    </table>

    <table border="0" align="center" width="220"> 
        <tr>
            <td align="center" width="50%"><form action="form_utama_toko.jsp"><br><input type="image" src="image/kembali_button.png" width="90" height="25" name="kembali"></form></td>
        </tr>
    </table>
</body>
</html>